package com.sedu.manage.service.impl;

import java.util.List;
import com.sedu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sedu.manage.mapper.AttentionStudentMapper;
import com.sedu.manage.domain.AttentionStudent;
import com.sedu.manage.service.IAttentionStudentService;

/**
 * 考勤重点关注Service业务层处理
 * 
 * @author yulinfeng
 * @date 2025-03-29
 */
@Service
public class AttentionStudentServiceImpl implements IAttentionStudentService 
{
    @Autowired
    private AttentionStudentMapper attentionStudentMapper;

    /**
     * 查询考勤重点关注
     * 
     * @param attentionId 考勤重点关注主键
     * @return 考勤重点关注
     */
    @Override
    public AttentionStudent selectAttentionStudentByAttentionId(Long attentionId)
    {
        return attentionStudentMapper.selectAttentionStudentByAttentionId(attentionId);
    }

    /**
     * 查询考勤重点关注列表
     * 
     * @param attentionStudent 考勤重点关注
     * @return 考勤重点关注
     */
    @Override
    public List<AttentionStudent> selectAttentionStudentList(AttentionStudent attentionStudent)
    {
        return attentionStudentMapper.selectAttentionStudentList(attentionStudent);
    }

    /**
     * 新增考勤重点关注
     * 
     * @param attentionStudent 考勤重点关注
     * @return 结果
     */
    @Override
    public int insertAttentionStudent(AttentionStudent attentionStudent)
    {
        attentionStudent.setCreateTime(DateUtils.getNowDate());
        return attentionStudentMapper.insertAttentionStudent(attentionStudent);
    }

    /**
     * 修改考勤重点关注
     * 
     * @param attentionStudent 考勤重点关注
     * @return 结果
     */
    @Override
    public int updateAttentionStudent(AttentionStudent attentionStudent)
    {
        attentionStudent.setUpdateTime(DateUtils.getNowDate());
        return attentionStudentMapper.updateAttentionStudent(attentionStudent);
    }

    /**
     * 批量删除考勤重点关注
     * 
     * @param attentionIds 需要删除的考勤重点关注主键
     * @return 结果
     */
    @Override
    public int deleteAttentionStudentByAttentionIds(Long[] attentionIds)
    {
        return attentionStudentMapper.deleteAttentionStudentByAttentionIds(attentionIds);
    }

    /**
     * 删除考勤重点关注信息
     * 
     * @param attentionId 考勤重点关注主键
     * @return 结果
     */
    @Override
    public int deleteAttentionStudentByAttentionId(Long attentionId)
    {
        return attentionStudentMapper.deleteAttentionStudentByAttentionId(attentionId);
    }
}
